<?php

//学期列表
$year_options=$year;
$coursename=array(
    'class'=>'text coursename',
    'name'=>'coursename[]',
    'type'=>'text',
);
//教师列表
$teacherid_options=array();
$teacherid_options['']='请选择';
foreach($teacherid as $i) {
    $teacherid_options[$i->id]=$i->username;
}
$submit=array(
    'name'=>'submit',
    'class'=>'submit',
    'type'=>'submit',
    'value'=>'submit',
    'id'=>'addcourse_submit'
);
?><head>
    <?php $this->load->view('load_view'); ?>
</head>
<ul class="cloneE" style="display:none;">
    <li><?php echo form_input($coursename); ?> -> <?php echo form_dropdown('teacherid[]',$teacherid_options) ?></li>
</ul>
<div class="col-wrap handin-wrap">
    <!--start col-->
    <div class="col handin">
        <div class="wrap-title">
            <p class="page-title">添加课程</p>
        </div>

        <p class="desc bg">
    	页面提示：添加本学期的所有课程，并指定老师
        </p>
        <div class="itemtitle">
            <h3>操作步骤</h3>
            <?php $this->load->view('admin/sylloptions'); ?>
            <div class="clear"></div>
        </div>
        <?php echo form_open('admin/syllabus/addcourse',array('class'=>'syllabus','id'=>'addcourse')); ?>
        <!--start syllabue-wrap-->
        <div class="list syllabus">
            <p>
                <?php
                echo form_label('选择学期：');
                echo form_dropdown('year',$year_options);
                ?>
            </p>
            <p>&nbsp;</p>
            <ul class="addcourse">
                <li class="title"><p>课程名称</p><p>对应老师</p><div class="clear"></div></li>
                <li><?php echo form_input($coursename); ?> -> <?php echo form_dropdown('teacherid[]',$teacherid_options) ?></li>
            </ul>
            <a href="javascript:" id="addnewcourse">添加新课程</a>
            <?php echo form_input($submit); ?>
        </div>
        <!--end syllabus-wrap-->

        <?php echo form_close(); ?>
    </div>
    <!--end col-->
</div>
<!--end col-wrap-->
<script>
    $('ul.selectNav li#addcourse').addClass('current');
    $(window.parent.document).find("ul.nav li a").removeClass("then");
    $(window.parent.document).find("a#syllabus").attr("class","then");
</script>
